import { Init, Provide, Inject } from '@midwayjs/decorator';
import { BaseService } from '@cool-midway/core';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm';
import { GoldTypeListEntity } from '../entity/list';

/**
 * gold模块-类型列表服务
 */
@Provide()
export class GoldTypeSetMealListService extends BaseService {
  @InjectEntityModel(GoldTypeListEntity)
  goldTypeListEntity: Repository<GoldTypeListEntity>;

  @Init()
  async init() {
    await super.init();
    this.setEntity(this.goldTypeListEntity);
  }

  @Inject()
  ctx;

  async setMeal(BodyData: any) {
    let sql = "select * from gold_type_list"
    let res = await this.nativeQuery(sql)
    return res
  }
}
